
<!-- <script type="text/javascript" src="__PUBLIC__/js/jquery.progressbar.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.progressbar.js"></script>
 <script type="text/javascript">
    $(document).ready(function () {
　　　　$("#progress1").progressBar({$percent}, { barImage: '__PUBLIC__/images/progressbg_green.gif' });
　　});
</script> -->



<script typt="text/javascript">
   function setapprovrVal(){
	   var receivedamount = document.getElementById('receivedamount');
	   var univalence = document.getElementById('univalence');
	   var capacity = document.getElementById('capacity');
	  
	   if(receivedamount.value!==null&&receivedamount.value!==""&&univalence.value!==null&&univalence.value!==""){
		   capacity.value = receivedamount.value / univalence.value;
	   }else if(univalence.value!==null&&univalence.value!==""&&capacity.value!==null&&capacity.value!==""){
		   receivedamount.value = univalence.value*capacity.value;
	   }
   }
</script>
<div class="pageContent">

	<form method="post" action="__URL__/passapprove/navTabId/__MODULE__/callbackType/closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<input type="hidden" name="approveid" value="<?php echo $_SESSION[C('USER_AUTH_KEY')] ?>">
		<input type="hidden" name="id" value="{$vo.id}" >
		<input type="hidden" name="ajax" value="1">
		<input type="hidden" name="pid" value="{$vo.pid}">
		<input type="hidden" name="contractno" value="{$vo.contractno}">
		<div class="pageFormContent" layoutH="58">
		<table  class="table" width="100%" >
			<tr>
			    <td>合同标题</td><td>{$vo.subject}</td>
			    <td>合同编号</td><td>{$vo.contractno}</td>
			</tr>
			<tr>
			    <td>合同金额</td><td>{$vo.contractamount}</td>
			    <td>合同来源</td><td><eq name="vo.projectid" value="0">投标合同<else/>销售合同</eq></td>
			</tr>
			<tr>
			    <td>签约人</td><td>{$vo.signupuser}</td>
			    <td>签约时间</td><td>{$vo.signuptime}</td>
			</tr>
			<tr>
			    <td>总数量</td><td>{$vo.quality}</td>
			</tr>
			<tr>
			    <td>已放量</td><td>{$vo.alshipment}</td>
			    <td>未放量</td><td>{$vo.notshipment}</td>
			</tr>
		
		</table>
		<div class="unit">
			    <label>主要条款</label>
				<textarea name="note" rows="1" cols="58" style="width: 400px;">{$vo.mainitem}</textarea>
			</div>
			<div class="unit">
			    <label>售后条款</label>
				<textarea name="note" rows="1" cols="58" style="width: 400px;">{$vo.salesafteritem}</textarea>
			</div>
		 <div class="unit">
				<label>到款金额</label>
				<input type="text" class="number" id="receivedamount"  name="receivedamount" onblur="setapprovrVal();">
		 </div>
		  <div class="unit">
				<label>单价</label>
				<input type="text" class="number" id="univalence" name="univalence" onblur="setapprovrVal();">
		 </div>
		 <div class="unit">
				<label>放量(吨)</label>
				<input type="text"  class="number" id="capacity" name="capacity" onblur="setapprovrVal();">
			          款到卸车：
			  <input name="payondelivery" id="payondelivery" type="checkbox" value="1" />
		 </div>
		 <div class="unit">
				<label>备注</label>
				<textarea name="note" rows="3" cols="58" style="width: 400px;">{$vo.note}</textarea>
		 </div>
		   <!-- <div class="unit" style="width: 500px;">
		    <div id="progress1" style="width: 500px;"> </div> 
		   </div> -->
		   <div class="unit">
		   	<div class="progress-bar blue stripes" style="float: left;">
             	<span style="width: {$percent}%"></span>
           	</div>
            <div style="float: left;margin-top: 35px;margin-left: 5px;" class="stripes"><strong>{$percent}%</strong></div>
           </div>
		</div>
		
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>

</div>

